package com.weimob.mcloud.wechatwork.customer.domain.artemis;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 客户搜索msg
 * Create Time: 2021年10月31日 21:36
 *
 * @author maosheng.li
 **/
@Data
public class CustomerSearchInitEventMsg implements Serializable {

    private Long bosId;
    private Long sourceProductInstanceId;
    private Long sourceProductId;
    private Long wid;
    private String nickname;
    private Integer gender;
    private String appId;
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date corpWxLastAddTime;
    private Long corpWxFirstAddTime;
    private Integer corpWxUserNum;
    private Integer corpWxFriendNum;
    private List<CorpWxUserInfoListBean> corpWxUserInfoList;

    private List<CorpWxTagInfoListBean> corpWxTagInfoList;

    private String externalUserId;

    private List<String> phone;

    /**
     * 授权状态，0代表在授权范围内，1代表不在权限范围内
     */
    private Integer authorizationState;

    /**
     * 被授权的vid节点，这个是数组，同时支持数据包含查询
     */
    private List<Long> authorizeVidList;

    /**
     * 是否被删除
     */
    private Boolean deleted;

    @Data
    public static class CorpWxUserInfoListBean implements Serializable {
        /**
         * userId : Lorem eiusmod
         * addTime : 64789538
         * friended : 31127473
         */
        private String userId;

        @JSONField(format = "yyyy-MM-dd HH:mm:ss")
        private Date addTime;

        private Integer friended;

        /**
         * 添加方式
         * 0-未知
         * 1-扫描二维码
         * 2-搜索手机号
         * 3-名片分享
         * 4-群聊
         * 5-手机通讯录
         * 6-微信联系人
         * 7-来自微信的添加好友申请
         * 8-安装第三方应用时自动添加的客服人员
         * 9-搜索邮箱
         * 10-视频号主页添加
         * 11-内部成员共享
         * 12-管理员/负责人分配
         */
        private Integer addWay;

        private List<Integer> subAddWay;

    }

    @Data
    public static class CorpWxTagInfoListBean implements Serializable {
        private String tagId;
        private String attrId;
        private String attrValue;
    }

}
